[IA64] cleanup warning in xen/ia64 (arch/ia64/linux-xen)
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 28 Feb 2006 17:26:43 +0000 (10:26 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 28 Feb 2006 17:26:43 +0000 (10:26 -0700)
These patches fix many issue (ex. panic dom0, oops domU/dom0...).
we will fix compile warnnings one step at a time.

Signed-off-by: Tsunehisa Doi <doi.tsunehisa@jp.fujitsu.com>
Signed-off-by: Kouya SHIMURA <kouya@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
xen/arch/ia64/linux-xen/minstate.h
xen/arch/ia64/linux-xen/setup.c
xen/arch/ia64/linux-xen/unaligned.c
xen/arch/ia64/linux-xen/unwind.c

index 56e4cb3d3fea283f78c6c26ca8b39539674d7b88..16b21443adc2cc4bf13e8cf2a2e6d272e162bc10 100644 (file)
        ;;                                                                                      \
 .mem.offset 0,0; st8.spill [r16]=r13,16;                                                       \
 .mem.offset 8,0; st8.spill [r17]=r21,16;       /* save ar.fpsr */                              \
-       /* XEN mov r13=IA64_KR(CURRENT);        /* establish `current' */                               \
+       /* XEN mov r13=IA64_KR(CURRENT);*/      /* establish `current' */                               \
        MINSTATE_GET_CURRENT(r13);              /* XEN establish `current' */                           \
        ;;                                                                                      \
 .mem.offset 0,0; st8.spill [r16]=r15,16;                                                       \
index 7f351dd05c983a2d2ddbb1e330bd15e905329c4b..d99fd197087be7927a33cc60f1b239daacd662fa 100644 (file)
@@ -94,6 +94,10 @@ struct io_space io_space[MAX_IO_SPACES];
 EXPORT_SYMBOL(io_space);
 unsigned int num_io_spaces;
 
+#ifdef XEN
+extern void early_cmdline_parse(char **);
+#endif
+
 /*
  * "flush_icache_range()" needs to know what processor dependent stride size to use
  * when it makes i-cache(s) coherent with d-caches.
@@ -500,6 +504,7 @@ late_setup_arch (char **cmdline_p)
        paging_init();
 }
 
+#ifndef XEN
 /*
  * Display cpu info for all cpu's.
  */
@@ -611,14 +616,13 @@ c_stop (struct seq_file *m, void *v)
 {
 }
 
-#ifndef XEN
 struct seq_operations cpuinfo_op = {
        .start =        c_start,
        .next =         c_next,
        .stop =         c_stop,
        .show =         show_cpuinfo
 };
-#endif
+#endif /* XEN */
 
 void
 identify_cpu (struct cpuinfo_ia64 *c)
index e21437cd24724393ea32608a1942942b4db6b91c..cddf0ab4a0ea778e5cdd751e19f251ac6610b307 100644 (file)
@@ -216,6 +216,7 @@ static u16 gr_info[32]={
        RPT(r28), RPT(r29), RPT(r30), RPT(r31)
 };
 
+#ifndef XEN
 static u16 fr_info[32]={
        0,                      /* constant : WE SHOULD NEVER GET THIS */
        0,                      /* constant : WE SHOULD NEVER GET THIS */
@@ -285,6 +286,7 @@ invala_fr (int regno)
        }
 #      undef F
 }
+#endif /* XEN */
 
 static inline unsigned long
 rotate_reg (unsigned long sor, unsigned long rrb, unsigned long reg)
@@ -299,12 +301,11 @@ rotate_reg (unsigned long sor, unsigned long rrb, unsigned long reg)
 void
 set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned long nat)
 {
-       struct switch_stack *sw = (struct switch_stack *) regs - 1;
-       unsigned long *bsp, *bspstore, *addr, *rnat_addr, *ubs_end;
+       unsigned long *bsp, *bspstore, *addr, *rnat_addr;
        unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
-       unsigned long rnats, nat_mask;
+       unsigned long nat_mask;
     unsigned long old_rsc,new_rsc;
-       unsigned long on_kbs,rnat;
+       unsigned long rnat;
        long sof = (regs->cr_ifs) & 0x7f;
        long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
        long rrb_gr = (regs->cr_ifs >> 18) & 0x7f;
@@ -323,7 +324,7 @@ set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned
     new_rsc=old_rsc&(~0x3);
     ia64_set_rsc(new_rsc);
 
-    bspstore = ia64_get_bspstore();
+    bspstore = (unsigned long*)ia64_get_bspstore();
     bsp =kbs + (regs->loadrs >> 19);//16+3
 
        addr = ia64_rse_skip_regs(bsp, -sof + ridx);
@@ -335,7 +336,7 @@ set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned
         ia64_flushrs ();
         ia64_mf ();
                *addr = val;
-        bspstore = ia64_get_bspstore();
+        bspstore = (unsigned long*)ia64_get_bspstore();
        rnat = ia64_get_rnat ();
         if(bspstore < rnat_addr){
             rnat=rnat&(~nat_mask);
@@ -362,13 +363,11 @@ set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned
 
 
 static void
-get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, unsigned long *nat)
+get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int*nat)
 {
-    struct switch_stack *sw = (struct switch_stack *) regs - 1;
-    unsigned long *bsp, *addr, *rnat_addr, *ubs_end, *bspstore;
+    unsigned long *bsp, *addr, *rnat_addr, *bspstore;
     unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
-    unsigned long rnats, nat_mask;
-    unsigned long on_kbs;
+    unsigned long nat_mask;
     unsigned long old_rsc, new_rsc;
     long sof = (regs->cr_ifs) & 0x7f;
     long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
@@ -388,7 +387,7 @@ get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, unsigne
     new_rsc=old_rsc&(~(0x3));
     ia64_set_rsc(new_rsc);
 
-    bspstore = ia64_get_bspstore();
+    bspstore = (unsigned long*)ia64_get_bspstore();
     bsp =kbs + (regs->loadrs >> 19); //16+3;
 
     addr = ia64_rse_skip_regs(bsp, -sof + ridx);
@@ -399,14 +398,14 @@ get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, unsigne
 
         ia64_flushrs ();
         ia64_mf ();
-        bspstore = ia64_get_bspstore();
+        bspstore = (unsigned long*)ia64_get_bspstore();
     }
     *val=*addr;
     if(nat){
         if(bspstore < rnat_addr){
-            *nat=!!(ia64_get_rnat()&nat_mask);
+            *nat=(int)!!(ia64_get_rnat()&nat_mask);
         }else{
-            *nat = !!((*rnat_addr)&nat_mask);
+            *nat = (int)!!((*rnat_addr)&nat_mask);
         }
         ia64_set_rsc(old_rsc);
     }
@@ -634,6 +633,7 @@ fph_index (struct pt_regs *regs, long regnum)
        return rotate_reg(96, rrb_fr, (regnum - IA64_FIRST_ROTATING_FR));
 }
 
+#ifndef XEN
 static void
 setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
 {
@@ -682,6 +682,7 @@ setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
                regs->cr_ipsr |= IA64_PSR_MFL;
        }
 }
+#endif /* XEN */
 
 /*
  * Those 2 inline functions generate the spilled versions of the constant floating point
@@ -699,6 +700,7 @@ float_spill_f1 (struct ia64_fpreg *final)
        ia64_stf_spill(final, 1);
 }
 
+#ifndef XEN
 static void
 getfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
 {
@@ -748,6 +750,7 @@ getfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
                }
        }
 }
+#endif /* XEN */
 
 
 #ifdef XEN
@@ -803,6 +806,7 @@ getreg (unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs
                *nat  = (*unat >> (addr >> 3 & 0x3f)) & 0x1UL;
 }
 
+#ifndef XEN
 static void
 emulate_load_updates (update_t type, load_store_t ld, struct pt_regs *regs, unsigned long ifa)
 {
@@ -1078,6 +1082,7 @@ emulate_store_int (unsigned long ifa, load_store_t ld, struct pt_regs *regs)
 
        return 0;
 }
+#endif /* XEN */
 
 /*
  * floating point operations sizes in bytes
@@ -1153,6 +1158,7 @@ float2mem_double (struct ia64_fpreg *init, struct ia64_fpreg *final)
        ia64_stfd(final, 6);
 }
 
+#ifndef XEN
 static int
 emulate_load_floatpair (unsigned long ifa, load_store_t ld, struct pt_regs *regs)
 {
@@ -1437,6 +1443,7 @@ within_logging_rate_limit (void)
        return 0;
 
 }
+#endif /* XEN */
 
 void
 ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
index dbad12762aca7048711887dfa7544503ba1b0d4a..c8bc766b4f2754db1b77eb3ac979c6d98d8a9c70 100644 (file)
@@ -484,7 +484,8 @@ unw_access_fr (struct unw_frame_info *info, int regnum, struct ia64_fpreg *val,
        } else if (regnum <= 15) {
                if (regnum <= 11) {
                        pt = get_scratch_regs(info);
-                       addr = &pt->f6  + (regnum - 6);
+                       //XXX struct ia64_fpreg and struct pt_fpreg are same.
+                       addr = (struct ia64_fpreg*)(&pt->f6  + (regnum - 6));
                }
                else
                        addr = &info->sw->f12 + (regnum - 12);